<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form action="goodsList" method="post">
		<div align="center">
			名称:<input type="text" name="name" /> 品牌:<select name="brandId">
				<option value="-1">请选择</option>
				<c:forEach var="b" items="${brandlist}">
					<option value="${b.id}">${b.name}</option>
				</c:forEach>
			</select> 类别:<select name="typeId">
				<option value="">请选择</option>
				<c:forEach var="t" items="${goodsTypelist}">
					<option value="${t.id}">${t.name}</option>
				</c:forEach>
			</select> <input type="submit" value="查询" /> <a href="addGoods">添加</a>
		</div>
	</form>
	<table border="1" align="center" width="2000">
		<tr>
			<td>编号</td>
			<td>名称</td>
			<td>标题</td>
			<td>市场价</td>
			<td>现价</td>
			<td>折扣</td>
			<td>品牌</td>
			<td>重量</td>
			<td>产地</td>
			<td>上市时间</td>
			<td>描述</td>
			<td>产品分类</td>
			<td>是否是热卖商品</td>
			<td>是否是限时特卖</td>
			<td>是否是类别热卖商品</td>
			<td>图片1</td>
			<td>图片2</td>
			<td>图片3</td>
			<td>图片4</td>
			<td>图片5</td>
		</tr>
		<c:forEach var="g" items="${list}">
			<tr>
				<td>${g.id}</td>
				<td>${g.name}</td>
				<td>${g.title}</td>
				<td>${g.markPrice}</td>
				<td>${g.price}</td>
				<td>${g.sales}</td>
				<td>${g.brand.name}</td>
				<td>${g.weight}</td>
				<td>${g.place}</td>
				<td>${g.createTime}</td>
				<td>${g.description}</td>
				<td>${g.goodsType.name}</td>
				<td>${g.isHot}</td>
				<td>${g.isSales}</td>
				<td>${g.isTypeHot}</td>
				<td>${g.img1}</td>
				<td>${g.img2}</td>
				<td>${g.img3}</td>
				<td>${g.img4}</td>
				<td>${g.img5}</td>
			</tr>
		</c:forEach>
	</table>
	<div class="page">
		<a
			href="goodsList?name=${name}&brandId=${g.brand.id}&typeId=${g.goodsType.id}">首页</a>
		<a
			href="goodsList?pageIndex=${pageIndex-1}&name=${name}&brandId=${g.brand.id}&typeId=${g.goodsType.id}">上一页</a>
		<a
			href="goodsList?pageIndex=${pageIndex+1}&name=${name}&brandId=${g.brand.id}&typeId=${g.goodsType.id}">下一页</a>
		<a
			href="goodsList?pageIndex=${pageCount}&name=${name}&brandId=${g.brand.id}&typeId=${g.goodsType.id}">尾页</a>
	</div>
</body>
</html>
